<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8">
  <title>订单列表-{$tpshop_config['shop_info_store_title']}</title>
  <meta name="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
  <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
  <link rel="stylesheet" href="__STATIC__/css/index.css" type="text/css">
  <link rel="stylesheet" href="__STATIC__/css/myuser.css" type="text/css">
</head>

<body>
<!--------头部开始-------------->
<include file="Public/header" />
<include file="Public/topnav" />
<!--------头部结束-------------->

<div class="page_pad">
  <div class="page_margin">
    <div class="page_radius page_hidden">
      <div class="page_padin">
        <div class="user_page">
          <div class="user_poi">当前位置：首页 &gt; <span>我出售的网店</span></div>
          <div class="user_left">
            <include file="User/userleft" />
          </div><!--user_left-->

          <div class="user_right">
            <div class="order_page">
              <div class="uright_tabs">
                <ul>
                  <li><a  class="on" href="{:U('Home/User/seller_list')}">我出售的网店</a></li>
                  <li><a  href="{:U('Home/User/order_list')}">我购买的网店</a></li>
                  <li><a href="{:U('Home/User/goods_collect')}">我收藏的网店</a></li>
                  <div class="clear"></div>
                </ul>
              </div><!--uright_tabs-->

              <div class="order_list">
                <div class="order_ttable">
                  <table>
                    <tr>
                      <td width="250"><div class="order_ttli"><div class="h1">店铺名称</div></div></td>
                      <td width="140"><div class="order_ttli"><div class="h1">出售价格</div></div></td>
                      <!--<td width="160"><div class="order_ttli"><div class="h1">消保金额</div></div></td>-->
                      <!--<td width="100"><div class="order_ttli"><div class="h1">销售状态</div></div></td>-->
                      <td width="140">
                        <div class="order_ttli">
                          <div class="h1">交易状态</div>
                          <div class="order_ttli_in">
                            <ul>
                              <li><a href="{:U('seller_list')}">全部</a></li>
                              <!--<li><a href="{:U('order_list',array('status_id'=>1))}">求购待确认</a></li>-->
                              <li><a href="{:U('seller_list',array('status_id'=>1))}">待审核</a></li>
                              <!--<li><a href="{:U('seller_list',array('status_id'=>6))}">待上架</a></li>-->
                              <li><a href="{:U('seller_list',array('status_id'=>2))}">在售中</a></li>
                              <li><a href="{:U('seller_list',array('status_id'=>3))}">正在交易</a></li>
                              <li><a href="{:U('seller_list',array('status_id'=>4))}">交易完成</a></li>
                              <li><a href="{:U('seller_list',array('status_id'=>5))}">主动下架</a></li>

                            </ul>
                          </div>
                        </div>
                      </td>
                      <td><div class="order_ttli"><div class="h1">操作</div></div></td>
                    </tr>
                  </table>
                </div>
                <div class="order_ul">
                <!------------------------------->
                <foreach name="lists" item="v" key="k">
                  <div class="order_li">
                    <div class="order_libor">
                      <div class="order_lih2">
                        <div class="order_libor2">

                          <table>
                            <tr>
                              <td align="left" width="250">
                                <div class="order_tt">
                                  <a href="{:U('Home/Goods/goodsInfo',array('id'=>$v['goods_id']))}" target="_blank">
                                  <span>
                                    <php>if($v[goods_type]==3){</php>
                                     <img src="__STATIC__/images/sico_tm.png" />
                                    <php>}elseif($v[goods_type]==4){</php>
                                     <img src="__STATIC__/images/sico_tb.png" />
                                    <php>}elseif($v[goods_type]==5){</php>
                                     <img src="__STATIC__/images/sico_jd.png" />
                                    <php>}elseif($v[goods_type]==6){</php>
                                     <img src="__STATIC__/images/sico_qt.png" />
                                    <php>} </php>

                                  </span>
                                    {$v.seller_name}
                                  </a>
                                </div>
                              </td>
                              <td width="140"><span class="order_pp">￥<span>{$v.price}</span></span></td>
                              <!--<td width="160">
                                <p><span class="order_pp">￥<span>{$v.b_price}</span></span></p>
                                <p>技术年费(<span class="order_pp">￥<span>{$v.j_price}</span></span>)</p>
                              </td>-->
                              <td width="140">
                                <php>if($v[status]==0){</php>
                                待审核
                                <php>}elseif($v[status]==1){</php>
                                在售中
                                <php>}elseif($v[status]==2){</php>
                                审核不通过
                                <php>}elseif($v[status]==3){</php>
                               正在交易
                                <php>}elseif($v[status]==5){</php>
                                主动下架
                                <php>}elseif($v[status]==4){</php>
                                已完成
                                <php>} </php>
                              </td>

                              <td>


                                <php>if($v[status]==0||$v[status]==2||$v[status]==5){</php>
                                <a href="{:U('Home/User/add_seller',array('goods_id'=>$v['goods_id'],'type_id'=>$v[goods_type]))}" >编辑</a>
                                <a href="javascript:;" onclick="del_seller('{$v[goods_id]}')">删除</a>

                                <php>}elseif($v[status]==1){</php>
                                <a href="javascript:xiajia_seller({$v['goods_id']})">下架</a>
                                <php>}else{</php>
                                  --
                                <php>} </php>


                              </td>



                            </tr>
                          </table>
                        </div>
                      </div><!--order_lih2-->
                    </div><!--order_libor-->
                  </div><!--order_li-->
                </foreach>
                </div><!--order_ul-->
                <div>{$page}</div>

                <!------------------------------->
              </div><!--order_list-->
            </div><!--order_page-->
          </div><!--user_right-->
          <div class="clear"></div>
        </div><!--user_page-->
      </div><!--page_padin-->
    </div><!--page_radius-->
  </div><!--page_margin-->
</div><!--page_pad-->

<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->


</body>
<script>

    function del_seller(goods_id){

        $.artConfim('删除后无法恢复，确定删除吗?', 'confimFrame', 'zh_cn', function (cancel) {
            if (cancel) {
                return false;
            }else{
                window.location.href='/index.php/Home/User/del_seller/goods_id/'+goods_id;
            }
        })
    }


    function xiajia_seller(goods_id){
      /*if(!confirm("确定取消订单?"))
       return false;*/
        layer.confirm('确定下架？', {
                title: "提示",
                btn: ['确定','取消'] //按钮
            }, function(){
                location.href = "/index.php?m=Home&c=User&a=xiajia&goods_id="+goods_id;
            }
        );
    }





    function xiajia_seller1(goods_id,type) {
        if(type==1){
            var msg ='确定重新提交吗?';
            var href = 'index.php/Home/User/xiajia/type_id/1/goods_id/'+goods_id
        }else{
            var msg ='下架后再上架需要重新审核，确定下架吗?';
            var href = 'index.php/Home/User/xiajia/goods_id/'+goods_id
        }
        $.artConfim(msg, 'confimFrame', 'zh_cn', function (cancel) {
            if (cancel) {
                return false;
            }else{
                window.location.href=href;
            }
        })
    }








    $(document).ready(function(){
        $(".order_ttli").mousemove(function(){
            $(this).find(".order_ttli_in").show();
        });

        $(".order_ttli").mouseout(function(){
            $(this).find(".order_ttli_in").hide();
        });
    });

    /*$(function () {
     $("#h-s").click(function () {
     $('.ec-ta-x').css('left','124px');
     $('.ec-ta-x').css('width','110px');
     $(this).addClass("cullent");
     $('#q-s').removeClass("cullent");
     });
     });
     */
</script>

<script>
    $(function () {
        //高亮显示
        var active = '{$active_status}';
        if(!active)
            active = 'ALL';
        $('.wddd-li li').removeClass('wddd-red');
        $('#'+active).addClass('wddd-red');

        $("#h-s").mouseover(function () {
            $('.ec-ta-x').css('left','124px');
            $('.ec-ta-x').css('width','110px');
            $(this).addClass("cullent");
        });
        $("#h-s").mouseout(function () {
            $('.ec-ta-x').css('left','0px');
            $('.ec-ta-x').css('width','124px');
            $(this).removeClass("cullent");
        });
    });
    $(function () {
        $("#q-s").mouseover(function () {
            $('.ec-ta-x').css('left','0px');
            $(this).addClass("cullent");
        });
        $("#q-s").mouseout(function () {
            $('.ec-ta-x').css('left','0px');
        });
    });
    //取消订单
    function cancel_order(id){
      /*if(!confirm("确定取消订单?"))
       return false;*/
        layer.confirm('确定取消订单？', {
                title: "提示",
                btn: ['确定','取消'] //按钮
            }, function(){
                location.href = "/index.php?m=Home&c=User&a=cancel_order&id="+id;
            }
        );
    }
</script>
</html>